package models

// MaOrderGoods
type MaOrderGoods struct {
	ID              string  `gorm:"autoIncrement:false;column:id;type:bigint;not null;comment:ID" json:"id"`
	OutTradeNo      string  `gorm:"index:OutTradeNo,type:btree;column:out_trade_no;type:varchar(30);not null;default:'';comment:订单号" json:"out_trade_no"`
	ChildOutTradeNo string  `gorm:"column:child_out_trade_no;type:varchar(255); not null;default:'';comment:子订单号" json:"child_out_trade_no" json_old:"ChildOutTradeNo"`
	GoodsID         string  `gorm:"column:goods_id;type:varchar(30);not null;default:'';comment:商品id" json:"goods_id"`
	GoodsName       string  `gorm:"index:idx_GoodsName,type:btree;column:goods_name;type:varchar(255);not null;default:'';comment:商品名称" json:"goods_name"`
	ClassID         string  `gorm:"column:class_id;type:varchar(30);not null;default:'';comment:分类ID" json:"class_id"`
	ContainerNum    string  `gorm:"column:container_num;type:varchar(30);not null;default:'';comment:货道号" json:"container_num"`
	Univalent       float64 `gorm:"column:univalent;type:decimal(10,2);default:0.00;comment:商品金额" json:"univalent"`
	CreatedAt       int64   `gorm:"column:created_at;autoCreateTime;type:int;size:64;comment:创建时间" json:"created_at"`
}

// TableName get sql table name.获取数据库表名
func (m MaOrderGoods) TableName() string {
	return "ma_order_goods"
}

// 模式自动注册
func init() {
	Models = append(Models, &MaOrderGoods{})
}
